/*
 * Copyright (c) 2015 Minshenglife. All rights reserved.
 * Minshenglife PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 *
 */
package com.sentry.entity;

import org.hibernate.annotations.Type;
import org.joda.time.DateTime;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * @author WuBo (wub1@minshenglife.com)
 *
 */
@Entity
@Table(name = "t_app")
public class UserApp {
    
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;
    
    @Type(type="org.joda.time.contrib.hibernate.PersistentDateTime")
    private DateTime createTime;
    
    @ManyToOne
    @JoinColumn(name="user_id", nullable=false)
    private User user;
    
    private Integer amount;
    
    private Integer quota;
    
    private String name;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }


    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }


    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAmount() {
        return amount;
    }

    public void setAmount(Integer amount) {
        this.amount = amount;
    }

    public Integer getQuota() {
        return quota;
    }

    public void setQuota(Integer quota) {
        this.quota = quota;
    }

    public DateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(DateTime createTime) {
        this.createTime = createTime;
    }


}
